<template>
  <div class="m-t">
    <div class="">
      <div class="m-t">
        <TableCompEle class="m-t"
          ref="multipleTable"
          height="50vh"
          :tableData="tableData"
          :tableConfig="tableConfig"
          :tableAction="tableAction"
          :isSelect="false"
          :isIndex="false"
          :isShowPage="false"></TableCompEle>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      queryParams: {
        total: 5,
        currentPage: 1,
        pageSize: 10
      },
      tableData: [
        {
          title: '科研设施信息网站',
          time: '2024-04-01',
          url: 'http://127.0.0.1:8080/facilities'
        },
        {
          title: '仪器设备信息网站',
          time: '2024-04-01',
          url: 'http://127.0.0.1:8080/instrument'
        },
        {
          title: '软件系统信息网站',
          time: '2024-04-01',
          url: 'http://127.0.0.1:8080/software'
        },
        {
          title: '共享资源信息发布网站',
          time: '2024-04-01',
          url: 'http://127.0.0.1:8080/servicePublish'
        },
        {
          title: '建言献策信息网站',
          time: '2024-04-01',
          url: 'http://127.0.0.1:8080/adviceManage'
        }
      ],
      tableConfig: [
        {
          prop: 'title',
          label: '标题'
        },
        {
          prop: 'time',
          label: '收藏时间'
        },
        {
          prop: 'url',
          label: '网址'
        }
      ],
      tableAction: {
        align: () => 'center',
        width: () => String(200),
        operations: [
          {
            label: '取消收藏',
            isLink: true,
            type: 'primary',
            method: row => {
              console.log('[ row ] >', row)
            }
          },
          {
            label: '查看网址',
            isLink: true,
            type: 'primary',
            method: row => {
              this.seeShare(row.url)
            }
          }
        ]
      }
    }
  },
  methods: {
    getList() {},
    seeShare(url) {
      window.open(url, '_blank')
    }
  }
}
</script>

<style lang="less" scoped>
</style>